package com_case;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import com_config.Browser1;
public class testbase {
    public static WebDriver driver;
    @BeforeClass
    public static void setUp() throws Exception {
        driver=Browser1.getDriver();//初始化浏览器driver对象

        /**设置运行超时的抛出异常*/
        driver.manage().timeouts().implicitlyWait(300, TimeUnit.SECONDS);
        //浏览器窗口最大化
        //driver.manage().window().maximize();
    }
    @AfterClass
    public static void tearDown() throws Exception {
        driver.quit();//关闭浏览器
    }
}